package zero.slr;

/**
 * Action表的表单元
 * 
 * @author Zero
 * 
 */
public class ActionUnit {
    public static final int ACC    = 0;
    public static final int STEP   = 1;
    public static final int REDUCE = 2;

    private Integer         action;
    private Integer         dest;

    public ActionUnit() {

    }

    public ActionUnit(Integer action, Integer dest) {
        this.action = action;
        this.dest   = dest;
    }

    public boolean isStep() {
        return action == STEP;
    }

    public boolean isAccepted() {
        return action == ACC;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    public Integer getDest() {
        return dest;
    }

    public void setDest(Integer dest) {
        this.dest = dest;
    }
}
